package com.vhall.component.controller.rbac.inner;


import com.vhall.component.entity.rbac.vo.ActionsVO;
import com.vhall.component.framework.common.annotation.VhallComponent;
import com.vhall.component.service.rbac.RbacRoleActionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * @author dalong
 * @date 2021-05-12 21:06
 */
@Api(tags = "RbacActionInnerController", value = "后台权限")
@Slf4j
@VhallComponent
public class RbacActionInnerController implements RbacActionInnerFacade {

    @Autowired
    private RbacRoleActionService roleActionService;

    @ApiOperation("按角色获取权限列表")
    @Override
    public List<ActionsVO> listByRoleId(@RequestParam("role_id") Integer roleId) {
        return roleActionService.listActionByRoleId(roleId);
    }

}
